package com.eastfair.venueservice.dto;

import com.eastfair.common.dto.CommonServiceBookingDTO;
import com.eastfair.venueservice.enumeration.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 服务订单
 * </p>
 *
 * @author dq
 * @since 2022-09-28
 */
@Data
@ApiModel(value = "ServiceOrderUpdateDTO", description = "服务订单")
public class ServiceOrderDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;
    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDeleted;
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;
    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    private Long subsystemId;
    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    private Long tenantId;
    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    @Size(max = 64, message = "订单编号长度不能超过64")
    private String orderNumber;
    /**
     * 报修订单关联的报修单号
     */
    @ApiModelProperty(value = "报修订单关联的报修单号")
    @Size(max = 64, message = "报修订单关联的报修单号长度不能超过64")
    private String repairReportNumber;
    /**
     * 订单总金额
     */
    @ApiModelProperty(value = "订单总金额")
    private BigDecimal totalAmount;
    /**
     * 附加费金额
     */
    @ApiModelProperty(value = "附加费金额")
    private BigDecimal surcharge;
    /**
     * 订单状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;DISPATCH:已派单;RECEIVE:已接单;COMPLETE:已完成;CANCEL:已取消}
     */
    @ApiModelProperty(value = "订单状态 #{NOT_SUBMIT:未提交;SUBMIT:已提交;PARTIAL_REPORT_VENUE:部分报馆;HAS_REPORT_VENUE:已报馆;DISPATCH:已派单;RECEIVE:已接单;COMPLETE:已完成;CANCEL:已取消}")
    private ServiceOrderOrderStatusEnum orderStatus;
    /**
     * 订单来源 #{ONLINE_BOOK:线上预定;ON_SITE_ORDER:现场预定;REPORT_ORDER:报馆订单;WORK_OVERTIME_ORDER:加班订单;BUILDER_REPORT:搭建商报馆订单;BUILDER_ONLINE_BOOK:搭建商线上预定;HOME_BUILDER_ORDER:主场预定的搭建商订单;HOME_EXHIBITOR_ORDER:主场预定的展商订单;VENUE_HOME_REPAIR_ORDER:场馆给主场下发的保修订单;HOME_BUILDER_REPAIR_ORDER:主场给搭建商下发的报修订单}
     */
    @ApiModelProperty(value = "订单来源 #{ONLINE_BOOK:线上预定;ON_SITE_ORDER:现场预定;REPORT_ORDER:报馆订单;WORK_OVERTIME_ORDER:加班订单;BUILDER_REPORT:搭建商报馆订单;BUILDER_ONLINE_BOOK:搭建商线上预定;HOME_BUILDER_ORDER:主场预定的搭建商订单;HOME_EXHIBITOR_ORDER:主场预定的展商订单;VENUE_HOME_REPAIR_ORDER:场馆给主场下发的保修订单;HOME_BUILDER_REPAIR_ORDER:主场给搭建商下发的报修订单}")
    private ServiceOrderOrderSourceEnum orderSource;
    /**
     * 订单时间
     */
    @ApiModelProperty(value = "订单时间")
    private LocalDateTime orderTime;
    /**
     * 是否是管理费订单(0:否, 1:是)
     */
    @ApiModelProperty(value = "是否是管理费订单(0:否, 1:是)")
    private Integer isManageExpense;
    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    private Long exhibitionManageId;
    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 64, message = "展会名称长度不能超过64")
    private String exhibitionManageName;
    /**
     * 公司ID
     */
    @ApiModelProperty(value = "公司ID")
    private Long companyId;
    /**
     * 公司编码
     */
    @ApiModelProperty(value = "公司编码")
    @Size(max = 64, message = "公司编码长度不能超过64")
    private String companyCode;
    /**
     * 公司名称
     */
    @ApiModelProperty(value = "公司名称")
    @Size(max = 200, message = "公司名称长度不能超过200")
    private String companyName;
    /**
     * 公司类型
     */
    @ApiModelProperty(value = "公司类型")
    @Size(max = 64, message = "公司类型长度不能超过64")
    private String companyType;
    /**
     * 展商ID
     */
    @ApiModelProperty(value = "展商ID")
    private Long exhibitorId;

    /**
     * 展商名称
     */
    @ApiModelProperty(value = "展商名称")
    @Size(max = 64, message = "展商名称长度不能超过64")
    private String exhibitorName;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人")
    @Size(max = 100, message = "联系人长度不能超过100")
    private String contact;
    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    @Size(max = 100, message = "联系方式长度不能超过100")
    private String phone;
    /**
     * 展厅编码
     */
    @ApiModelProperty(value = "展厅编码")
    @Size(max = 64, message = "展厅编码长度不能超过64")
    private String spaceCode;
    /**
     * 展厅号
     */
    @ApiModelProperty(value = "展厅号")
    @Size(max = 100, message = "展厅号长度不能超过100")
    private String spaceName;
    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 100, message = "展位号长度不能超过100")
    private String siteName;
    /**
     * 应付金额
     */
    @ApiModelProperty(value = "应付金额")
    private BigDecimal shouldPayAmount;
    /**
     * 实际支付金额
     */
    @ApiModelProperty(value = "实际支付金额")
    private BigDecimal actualPayAmount;
    /**
     * 优惠金额
     */
    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discountAmount;
    /**
     * 支付方式
     */
    @ApiModelProperty(value = "支付方式")
    @Size(max = 64, message = "支付方式长度不能超过64")
    private String payWay;
    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;
    /**
     * 支付状态 #{NOT_PAY:未付款;HAS_PAY:已付款;PARTIAL_PAY:部分付款;SETTLE_AFTER_EXHIBITION:会后结算;REFUND_APPLIED:已申请退款;REFUNDING:退款中;HAS_REFUND:已退款;REFUND_REJECT:退款驳回}
     */
    @ApiModelProperty(value = "支付状态 #{NOT_PAY:未付款;HAS_PAY:已付款;PARTIAL_PAY:部分付款;SETTLE_AFTER_EXHIBITION:会后结算;REFUND_APPLIED:已申请退款;REFUNDING:退款中;HAS_REFUND:已退款;REFUND_REJECT:退款驳回}")
    private ServiceOrderPayStatusEnum payStatus;
    /**
     * 退款状态
     */
    @ApiModelProperty(value = "退款状态")
    @Size(max = 64, message = "退款状态长度不能超过64")
    private String refundStatus;

    /**
     * 退款时间
     */
    @ApiModelProperty(value = "退款时间")
    private LocalDateTime refundTime;

    /**
     * 退款方式
     */
    @ApiModelProperty(value = "退款方式")
    @Size(max = 64, message = "退款方式长度不能超过64")
    private String refundWay;

    /**
     * 退款金额
     */
    @ApiModelProperty(value = "退款金额")
    private BigDecimal refundAmount;
    /**
     * 工单状态 #{NOT_DISPATCH:未派单;HAS_DISPATCH:已派单;HAS_RECEIVE:已接单;PARTIAL_COMPLETE:部分完成;COMPLETE:已完成}
     */
    @ApiModelProperty(value = "工单状态 #{NOT_DISPATCH:未派单;HAS_DISPATCH:已派单;HAS_RECEIVE:已接单;PARTIAL_COMPLETE:部分完成;COMPLETE:已完成}")
    private ServiceOrderWorkOrderStatusEnum workOrderStatus;
    /**
     * 派单时间
     */
    @ApiModelProperty(value = "派单时间")
    private LocalDateTime dispatchWorkOrderTime;

    /**
     * 交易完成时间
     */
    @ApiModelProperty(value = "交易完成时间")
    private LocalDateTime finishOrderTime;

    /**
     * 搭建商订单服务报馆状态 #{NOT_REPORT:未报馆;PARTIAL_REPORT:部分报馆;HAS_REPORT:已报馆;NOT_NEED_REPORT:无需报馆}
     */
    @ApiModelProperty(value = "搭建商订单服务报馆状态 #{NOT_REPORT:未报馆;PARTIAL_REPORT:部分报馆;HAS_REPORT:已报馆;NOT_NEED_REPORT:无需报馆}")
    private ServiceOrderServiceReportVenueStatusEnum serviceReportVenueStatus;

    /**
     * 开票状态 #{NOT_INVOICE:未开票;HAS_INVOICE:已开票}
     */
    @ApiModelProperty(value = "开票状态 #{NOT_INVOICE:未开票;HAS_INVOICE:已开票}")
    private ServiceOrderInvoiceStatusEnum invoiceStatus;
    /**
     * 已开票金额
     */
    @ApiModelProperty(value = "已开票金额")
    private BigDecimal invoiceAmount;
    /**
     * 发票号码
     */
    @ApiModelProperty(value = "发票号码")
    @Size(max = 64, message = "发票号码长度不能超过64")
    private String invoiceNumber;
    /**
     * 发票代码
     */
    @ApiModelProperty(value = "发票代码")
    @Size(max = 100, message = "发票代码长度不能超过100")
    private String invoiceCode;
    /**
     * 订单归属系统
     */
    @ApiModelProperty(value = "订单归属系统")
    @Size(max = 64, message = "订单归属系统长度不能超过64")
    private String belongSystem;
    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注信息")
    @Size(max = 500, message = "备注信息长度不能超过500")
    private String remark;
    /**
     * 服务预定列表
     */
    @ApiModelProperty(value = "服务预定列表")
    private List<CommonServiceBookingDTO> commonServiceBookingList;
    /**
     * 服务商ID
     */
    @ApiModelProperty(value = "服务商ID")
    private Long serviceProviderId;
    /**
     * 订单归属系统列表
     */
    @ApiModelProperty(value = "订单归属系统列表")
    private List<String> belongSystemList;
    /**
     * 订单来源列表
     */
    @ApiModelProperty(value = "订单来源列表")
    private List<String> orderSourceList;
    /**
     * 订单来源列表
     */
    @ApiModelProperty(value = "订单来源列表")
    private List<ServiceOrderOrderSourceEnum> orderSourceEnumList;
    /**
     * 订单预定列表
     */
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private List<ServiceBookingDTO> serviceBookingList;
    /**
     * 主场ID
     */
    @ApiModelProperty(value = "主场ID")
    private Long homeId;
    /**
     * 展厅编码列表
     */
    @ApiModelProperty(value = "展厅编码列表")
    private List<String> spaceCodeList;
    /**
     * 搭建商ID
     */
    @ApiModelProperty(value = "搭建商ID")
    private Long builderId;
    /**
     * 创建开始时间
     */
    @ApiModelProperty(value = "订单时间")
    private LocalDateTime createTimeStart;
    /**
     * 创建结束时间
     */
    @ApiModelProperty(value = "订单时间")
    private LocalDateTime createTimeEnd;
    /**
     * 付款方
     */
    @ApiModelProperty(value = "付款方")
    private String payer;
    /**
     * 收款方
     */
    @ApiModelProperty(value = "收款方")
    private String payee;

    /**
     * 商户系统标识
     */
    @ApiModelProperty(value = "商户系统标识")
    private String systemCode;
    /**
     * 公司ID列表
      */
    private List<Long> companyIdList;
    /**
     * 展商ID列表
     */
    private List<Long> exhibitorIdList;
}
